<?php 
namespace app\mobile\controller;

use think\Controller;
use think\Db;

class Index extends Controller
{
    // 首页
    public function index()
    {
        // 查询新闻遍历首页
        $list = db('news_dynamic')->order('id', 'desc')->limit('6')->select();
        // var_dump($list); exit;
        return view('mobile@index/index', [
            'list' => $list
        ]);
    }

    // 获取新闻列表内容
    public function indexs($id)
    {
        // echo 11111;die;
        // return '111'; exit;
        $list = db('news_dynamic')->find($id);
        // var_dump($list); exit;
        return view('mobile@index/content', [
            'list' => $list
        ]);
    }



    // 消息通知页
    public function info()
    {
        // 查询消息
        $list = db('tip_info')->order('addtime', 'desc')->limit('8')->select();
        // var_dump($list); exit;
        return view('mobile@index/info', [
            'list' => $list
        ]);
    }

    public function _empty(Request $request)
    {
        return view('/error');
    }

}










